Methods and systems for compressing and transmitting media signals are known in the art. Compressed digital video is largely becoming the preferred medium to transmit to video viewers everywhere. Part of the Moving Pictures Experts Group (MPEG) specifications are standardized methods for compressing and transmitting video. Various audio compression techniques are also known in the art. In general, MPEG is used today for transmitting video over terrestrial, wireless, satellite and cable communication channels and also for storing digital video.
An audio stream is organized as an ordered sequence of frames. A video stream is usually organized as an ordered sequence of pictures, each picture includes a plurality of pixels. A video picture includes a plurality of slices, each slice including a plurality of macro blocks. The audio and video streams are provided to an audio encoder and video encoder respectively to generate compressed audio and video elementary streams, also referred to as elementary streams.
MPEG compression/encoding utilizes various compression schemes, such as adaptive quantization, intra-frame encoding, inter-frame encoding, run length encoding and variable length coding. Intra-frame coding takes advantage of spatial redundancies in a picture. Inter-frame coding takes advantage of temporal redundancies from picture to picture in a video sequence. Inter-frame coding involves motion estimation and motion compensation. There are three types of motion estimations—forward, backward and bidirectional. Macroblocks are the elementary unit for motion compensation and adaptive quantization. Each macroblock is associated with a quantization factor field, representative of the degree of quantization. A slice, including a plurality of macroblocks includes a slice header that has a quantization factor field that is associated to some of the macro blocks of the slice.
The compressed elementary streams usually include a sequence of three types of pictures. These types are known as I-picture, P-picture and B-picture. I-pictures use only intra-coding. P-pictures use forward prediction and usually also intra-coding. B-pictures use bidirectional coding (forward and/or backward prediction) and optionally also intra-coding. In a sequence of I, P, and B-pictures, each P-picture is encoded in view of a previous I-picture or P-picture. Each B-picture is coded using a previous I-picture of P-picture and/or a next I-picture or P-picture.
A recognizable picture can be reconstructed from an I-picture alone, but not from a B-picture alone. Only I-pictures and P-pictures can be anchor pictures that are used to predict another pictures. I-pictures allow for reconstructing a recognizable picture but offers only relatively moderate compression. B-pictures are usually much smaller than I-pictures. Each picture includes a picture header that includes a picture type indication, indicating whether the picture is an I,B or P picture.
Pictures are sometimes arranged in groups, that are referred to as Group Of Pictures (GOP). Usually, each GOP starts by an I-picture that is followed by B-pictures and P-pictures.
Elementary streams are packetized to produce PES packets. PES packets made up of elementary streams that form a program share a common time base. The PES packets may also include additional information. PES packets of distinct elementary streams can be arranged as either a Program Stream or a Transport Stream. At least one or more stream of PES packets having a common base time are usually combined to a Program Stream. A Transport Stream combines one or more programs with one or more independent time bases into a single stream. Transport Streams include transport packets of 188 bytes. Transport Stream packets start with a transport packet header. The header includes a packet ID (PID). Transport Stream packets of one PID value carry data of a single elementary stream. Transport Streams include Program Specific Information (PSI) tables. The PSI tables specify which PIDs and accordingly which elementary streams are associated to form each program.
Transport Streams may be of either fixed or variable bit rate. Some programs of the Transport Stream are of a variable bit rate, if, for example, more bits are allocated to complex scenes, and less bits are allocated to more simple scenes.
Transport Streams are provided to a channel of a limited available bandwidth/storage space. The ISO/IEC 13818-1 specification defines a channel as a digital medium that stores or transports a Transport or a Program Stream. The aggregate bandwidth of all the components of the Transport Stream must not exceed, at any time, the available bandwidth of the channel.
Various lossy and lossless techniques are implemented to adapt the aggregate bandwidth of the programs of a Transport Stream to the available bandwidth of a channel. U.S. Pat. Nos. 6,038,256 and 6,192,083 of Linzer et al, U.S. Pat. Nos. 5,862,140 and 5,956,088 of Shen et al and U.S. Pat. No. 5,877,812 of Krause et al, describe some of these prior art methods. Lossless techniques, such as statistical multiplexing, do not require further compressing of media pictures. Lossless techniques also include delaying or advancing a transmission of transport packets. Lossy techniques involve additional compression, and are usually implemented whenever the appliance of lossless techniques is not feasible or does not provide sufficient results. The further compression usually results in visual quality degradation.
Some prior art methods base their compression decisions upon a complexity of a scene. A disadvantage of these prior art methods is that they are at most adapted to perform a first modification (such as compression) of a media stream and are not suited to perform additional modifications (such as recompression) of a media stream. Another disadvantage of some prior art methods is that these methods contribute to a quality fluctuation along a stream.
Some prior art systems, such as Rhode & Schwartz digital video quality analyzer DVQ and Tektronix quality of service monitor PQM300 allow for measuring the quality of a video picture. Each DVQ is configured to measure the quality of one picture at a time. Measuring the quality of multiple programs within a transport stream requires a plurality of DVQ, as illustrated in the article “Statistical multiplex—what does it mean for DVB-T?” by Dr. Kuhn and Dr, Antkowiak, FKT Fachezeitschrift fur Ferensehen, Film und elektronische Medien April 2000, reprinted in http://www.rhodeschwarts.com. Multiple PQM300 are required to monitor a plurality of programs. As the DVQ and the PQM300 are relatively expensive, real time measurements of multiple programs within a single transport stream is very costly.
Another disadvantage of the mentioned above prior art methods is that they cannot be tuned/controlled/refined in view of external information such as video provider preferences, viewers preferences or additional information, such as quality or quality degradation statistics.
There is a need to provide a system and a method for providing a multiplexed sequence, the multiplexed sequence including at least one sequence of basic media data units and/or replacing basic media data units, the system and method are responsive to at least one characteristic (such as quality, quality degradation, compression level and the like) of at least some of the basic media data units.
There is a need to provide a system and a method for providing a multiplexed sequence whereas the basic media data units of the multiplexed sequence are characterized by either an optimal quality, optimal quality degradation, optimal compression level, or a combination of said characteristics.
There is a need to provide a system and a method for adaptation of the aggregate bandwidth of the programs of a Transport Stream to the available bandwidth of a channel that provides programs with sufficient quality.
There is a need to provide a system and a method for adaptation of the aggregate bandwidth of the programs of a Transport Stream to the available bandwidth of a channel that are responsive to the quality degradation of each program.
There is a need to provide a system and a method for adaptation of the aggregate bandwidth/bit-rate of the programs of a Transport Stream to the available bandwidth of a channel that reduces compression level fluctuations and/or quality fluctuations in encoded video programs.
There is a need to provide a system and a method for applying lossy techniques for adaptation of the aggregate bandwidth of the programs of a Transport Stream to the available bandwidth of a channel in response to the compression level of basic media data units, such as macroblocks.
There is a need to provide a system and a method for adaptation of the aggregate bandwidth of the programs of a Transport Stream to the available bandwidth of a channel that provide an optimal Transport Stream, an optimal Transport Stream being characterized by optimal quality, compression level, quality degradation or a combination of said parameters.